home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir27
/
atk18ibm.zip
/
EXERCISE.TXT
< prev
next >
Wrap
Text File
|
1994-02-08
|
28KB
|
861 lines
-----------------------------------
/ A N A L Y S T T O O L K I T /
/ E X E R C I S E B O O K /
-----------------------------------
||
||
\/
---------------------------------------------------------
/ Copyright (C) Chinook Software Group 1994 /
/ all rights reserved /
---------------------------------------------------------
||
||
||
\/
==========================
/ Chinook Software Group /
/ P.O. Box 24536 /
/ Denver, CO. 80224 /
==========================
========================================================
/ This tool suite enables a user to perform top-down /
/ system specification using the Structured Analysis /
/ Methodology ( Data Flow Diagrams ). Diagrams are /
/ entered and manipulated graphically, but stored in /
/ textual form for easy access by other tools. Support /
/ is provided for data dictionary generation and /
/ analysis, as well as for analysis of the DFDs. /
========================================================
*** NOTICE: PLEASE READ ***
This document is a companion to the SHAREWARE CHINOOK Software
ATK product's tutorial.
An attempt has been made to cover most of the day-to-day usage
of the tool in this set of exercises, and to give it a step-
by-step, cookbook feeling. We welcome feedback as to its
organization and usefulness, and hope to improve this workbook
in future releases.
Exercises do build upon the skills in earlier exercises. We
recommend that they be worked in order. When you complete
them all, you should have learned enough about the tool to
draw your own DFDs.
The exercises do not cover all aspects of ATK, or even all of
GED. When many ways are available to perform a task, only one
is presented. Control flow usage is left out of these
exercises, as is user-customization of the CONFIG.GED file, as
is the use of ANAL, DDBUILD, DDEVAL, and other tools.
Information on these topics, and others, can be found in the
Tutorial and in the files in the DOC directory.
This document and the attendant software is provided as-is and
without warranty as to correctness or suitability for any
specific application. The CHINOOK SOFTWARE GROUP disclaims any
responsibility for the use or misuse of this software by any
individual or entity, for any purpose whatever.
If you find ATK instructive and useful, registering your copy
with us for $35 will go a long way toward allowing its authors
to continue its development. In return, you will be placed on
our mailing list to receive information about future releases
and other products. In addition, you will be given special
consideration with regard to future releases of ATK, and will
be sent additional documentation including detailed file
formats, evaluation rules, and reference pages for all
functions.
The asking price of $35 represents more than an order of
magnitude price break when compared with similar products
currently available. Your support is both needed and
appreciated.
Please send your contribution to:
The Chinook Software Group
P.O. Box 24536
Denver, CO. 80224
ATK Exercises
Table of Contents
Exercise 1: Entering and exiting GED ....................1
Exercise 2: Getting and clearing GED messages ...........2
Exercise 3: Visiting child processes and minispecs ......4
Exercise 4: Modifying a DFD .............................6
Exercise 5: Printing a DFD ..............................9
Exercise 6: Starting from scratch -- a new DFD .........11
Exercise 1: Entering and exiting GED
The goal of this exercise is just to ensure you understand the
keystrokes necessary to enter and exit the graphics editor.
Step 1: Starting GED
From the DOS command line, with the current directory set to
the place where the ATK executables (.EXE files) are, type
GED -psamples1
and press the Enter key
You should see a context diagram with the number -1, one
process circle, and some other items on the screen.
Step 2: Playing in GED
You should be able to move your cursor by either moving your
mouse (if installed) or by using the arrow keys. To make
small adjustments in the cursor position, use the h, j, k, and
l keys to move left, down, up, and right respectively.
You should be able to press any of the create keys (Alt-E,
Alt-P, Alt-S, Alt-F, ") or the move key (F4) and see changes
in the diagram. Rather than completing any of these actions,
you should press the cancel key (Esc) to leave the diagram
alone.
Step 3: Exiting GED
Press Exit (Alt-X) to exit the diagram. If you did not make
any permanent changes, you will be prompted with Sure you want
to exit? A return or a "y" response will return you to the
DOS prompt. You will find you are back in the same directory
you started from.
Congratulations! You have entered and exited the graphics
editor!
GED Exercises 1 Version 1.08
Exercise 2: Getting and clearing GED messages
GED displays a number of messages to the user, always at the
bottom of the screen, in the last 2 lines of the drawing
window. Since these two lines are also used for displaying
the number and title of the diagram, the messages must be
cleared from time to time.
Step 1: Start GED
Do this the same way you did it in Exercise 1.
Step 2: Get an error message
Press the Parent key (shift-F9).
You should see the messages Diagram has no parent and (Next
action will clear message) in the message area of the screen.
Press the space bar to show that any action, even an action
that is ignored, will clear the message and restore the
diagram name and number to the bottom of the screen.
Press the Move key (F4) with the cursor not located near any
object in the diagram. You should see the messages No
moveable object at current location and (Next action will
clear message) in the message area of the screen.
Press the Create Process key (Alt-P). You should see the
messages Cannot create process on context diagram and (Next
action will clear message) in the message area.
From now on, we will not mention the (Next action will clear
message) notification, since it is common to every message.
Step 3: Get an informational message
Press the Move key (F4) with the cursor located over an object
in the diagram.
Note the change in the cursor style as the object and all its
connecting flows have disappeared.
Press the Cancel key (Esc) to cancel the move process. The
informational message Move cancelled should appear in the
message area, and the cursor will change back to an arrow.
Press the Create Flow key (Alt-F) to begin creating a flow.
The informational message Flow from XXX (NEW) will appear in
the message area, where XXX is the type of object under the
cursor (or Boundary Point if no object is under the cursor),
and the cursor will change into a "ground" symbol.
Move the cursor over a process or external and press the Flow
key (Alt-F) again. The informational message now reads Name
GED Exercises 2 Version 1.08
Flow from XXX to YYY (NEW). Press cancel (Esc) to cancel the
creation of the new flow.
Step 4: Exit GED
If you are not going on to exercise 3 at this time, you may
exit GED (Alt-X).
Congratulations! You have now seen how many of GED's messages
are displayed!
GED Exercises 3 Version 1.08
Exercise 3: Visiting child processes and minispecs
Step 1: Start GED
Do this just like step 1 of exercise 1.
Step 2: Visit the child of process 0
Move the cursor until it is inside the process 0 circle.
Press the Visit Child key (F9 or mouse left button).
You should now see diagram 0, whose title is the same as the
name of process 0 in the parent diagram. The processes in
this diagram are numbered 1, 2, etc.
If you got the message Save diagram -1? then you have changed
the context diagram in some way, and are being asked whether
those changes should be saved or discarded. To be safe,
answer "no" to discard the changes.
Step 3: Return to the parent and back again
Without moving the cursor, press the Visit Parent key (shift-
F9 or mouse right button) to return to the context diagram.
Press the Visit Child key (F9 or mouse left button) to return
to the child diagram (0).
Step 4: Continue down the tree
Move the cursor over process 2 and press Visit Child (F9 or
mouse left button). You should now have diagram 0.2 on the
screen.
Move the cursor over process 3 and press Visit Child (F9 or
mouse left button). You should now have diagram 0.2.3 on the
screen.
Note that on some diagrams, you may see the text terminate
with a diamond or a block shape. This indicates that the text
has been truncated to fit in the object. Later, we will see
how resizing the object may allow all the text to be visible.
Step 5: See a minispec
Move the cursor over process 1 and press Visit Minispec (Alt-
F9).
This will bring up a text editor loaded with the minispec
description of process 1 of diagram 0.2.3. The default text
editor is EDLIN, which is a primitive line editor delivered
with every version of DOS since 2.0. The user can easily
change this in the CONFIG.GED configuration file to a screen
editor such as EDIT.
GED Exercises 4 Version 1.08
For EDLIN, you can use the l command (lowercase ell) to list
the file, and the q command to quit editing and return to GED,
right where you left off!
Also, note that if you press Visit Child on a process that has
a minispec, GED will assume you wish to decompose the process
into a child DFD. You will be prompted Delete Minispec?. If
you do not wish to delete the minispec to create a child
diagram, press "n" or cancel (Esc) at this point to cancel
creation of the child diagram and deletion of the minispec.
Step 6: Exit GED
If you are not going on to exercise 4 at this time, you may
exit GED (Alt-X).
Congratulations! You are now a DFD navigator!
GED Exercises 5 Version 1.08
Exercise 4: Modifying a DFD
Step 1: Start GED
Do this the same way you did it in Exercise 1.
Step 2: Get to diagram 0.2.3
Use the techniques you learned in Exercise 3 to accomplish
this.
Step 3: Enlarging and shrinking objects
Sometimes objects are not the proper size for display--we wish
to declutter the diagram, or wish a longer name to be visible.
Enlarging and shrinking objects in ATK is done with the
greater than (>) and less than (<) keys.
Enlarge the "Perform Optimization" process by placing the
cursor over this process and pressing the less than (<) key a
few times. Notice the process get slightly larger and the
words rearrange themselves to fit the new space. The process
started smaller (like the left end of the <) and became larger
(like the right end of the <).
Similarly, shrink the process with the long name at the top of
the diagram. Notice how the words are rearranged, and how a
diamond or block appears at the end of the word when it is
truncated.
Step 4: Renaming an object
That long name on the process at the top of the diagram is
unwieldy! Let's fix it!
Place the cursor over the process with the long name. Press
the Name key (F2). Notice that the prompt at the bottom asks
for a new name. You may either type in a new name, or copy
parts of the name that is already there. The left arrow key
and the F1 key will copy one character of the old name (just
like on the DOS command line). To copy a word, I can press F2
and then space (copy up until the next space), just like in
DOS. I can even press F3 and copy the whole old name into the
new name!
For this exercise, let's copy the first 4 words (F2 space F2
space F2 space F2 space). You should see Map parse tree to.
Now delete the next word (F4 space). Finally, copy the
remaining word (F3). You should see Map parse tree to code.
Press return to accept the new name.
Notice that the process has resized itself to accomodate the
new name. You may wish to adjust it to your liking by
enlarging or shrinking the process.
GED Exercises 6 Version 1.08
Step 5: Moving things around.
Flow names are moved just like any other object. Put the
cursor over a flow name, and press the Move key (F4). Move
the T cursor to where you wish the name to be, and press Move
again (F4).
Move the items connected to the flow around to see how the
flow name moves relative to the other objects.
Now, let's move a Flow! This will create a new route point,
effectively bending the line where you want it to go. Place
the cursor on a flow, but not too close to a flow name or
other object. Press the Move key (F4). Notice that the flow
is undrawn, and a "ground" symbol indicates where to put the
route point. Press the Move key (F4) again when you have the
cursor where you wish the route point to be.
Move some items around again, and notice that route points are
stationary; they do not move when other objects move.
Step 6: Deleting things
We will leave creating things for exercise 6; but here we will
look a bit at deleting things.
Position your cursor over your route point. If your flow name
is very nearby, you may wish to move it away first. Press the
Delete key (F10). The message Delete flow splitter(1)?
appears in the message window. If you press "Y", the flow
splitter will be deleted, and the line will straighten.
Now try something more substantial--process 3. When you
position your cursor over process 3 and press the Delete key
(F10), the message Delete process (3)? appears in the message
window. If process 3 had any children or a minispec under it,
the prompt would be appropriately modified (try this on
process 1!). When you press "Y", the process and all the
flows in and out of it are deleted.
Step 7: Recovering from an error
Oops! We really didn't want to delete that process! What can
we do?
Fortunately, you can recover to the point you last saved the
DFD, either when exiting from another session or by pressing
the Save key (F6).
In this case, press the Abort key (shift-F6), and respond "y"
to the prompt Sure you want to abort?, and the diagram will
look just like it did at the beginning of the exercise!
The moral is, save when you have a pretty stable base to work
from!
GED Exercises 7 Version 1.08
Step 8: Exit GED
If you are not going on to exercise 5 at this time, you may
exit GED (Alt-X).
Congratulations! You can rearrange DFDs to your liking!
GED Exercises 8 Version 1.08
Exercise 5: Printing a DFD
This exercise goes through the basic DOS methods of printing a
DFD. There are also Windows 3.1 tools available to import ATK
DFDs into Word for Windows, Powerpoint, and other programs;
using this method, the diagrams can be scaled and printed on
any printer that Windows supports.
Step 1: Check your configuration
You must be in DOS for this step, not in GED. More detailed
instructions for configuration are in PRINTING.DOC in the DOC
directory under the ATK base directory.
If you have an Epson printer or compatible, go to step 1a; if
you have an HP printer or compatible, go to step 1b; if you
have a Postscript printer, go to step 1c; otherwise, check the
notes in PRINTING.DOC and skip to step 2 when you are properly
configured.
Step 1a: If you have an Epson printer, find out what printer
port it is on. This is usually LPT1: (or PRN:). The rest of
these instructions assume it is LPT1:; if it is not,
substitute the correct device each time you see LPT1:.
These lines must be in your CONFIG.GED file:
PRINTER TYPE=epson
PRINTER MODE=-2
PRINTER PORT=LPT1:
Ensure that no other PRINTER lines are farther down in the
file!
Go to Step 2.
Step 1b: If you have an HP printer, find out what printer port
it is on. This is usually LPT1: (or PRN:). If your printer
is on a COM port (COM2, often), then type the line
MODE LPT1:=COM2:
at the DOS prompt, and then use LPT1 as the Printer port.
These lines must be in your CONFIG.GED file:
PRINTER TYPE=hp
PRINTER MODE=-2
PRINTER PORT=LPT1:
Ensure that no other PRINTER lines are farther down in the
file!
Go to Step 2.
Step 1c: If you have a Postscript printer, you will be
printing diagrams using GEDPS. Determine the diagram you wish
to print, say 0.2.3, and issue the DOS command
GEDPS -f tmp.ps 0.2.3
to place diagram 0.2.3 in Postscript format into the file
tmp.ps.
You can print the file by using the DOS command
COPY tmp.ps LPT1:
if your printer is on parallel port 1, or if you've redirected
GED Exercises 9 Version 1.08
LPT1 to a serial port (say, COM2) with the DOS command
MODE LPT1:=COM2:
If your printer is on a serial port, and the previous step
does not work properly (nothing prints), use the DOS command
PS tmp.ps
to print the file. PS supports flow control to serial ports.
You are done, so go on to exercise 6!
Step 2: Start GED
Do this the same way you did it in Exercise 1.
Step 3: Select the diagram to print
Do this the same way you navigated in Exercise 3.
Step 4: Invoke the print routine
Use the Print key (control-P) to begin the printing process.
Notice that the screen is redrawn and the cursor is made
invisible.
The cursor will return automatically when the printing process
is completed.
Check your output for proper sizing and scaling; check
PRINTING.DOC to see what adjustments are available to make the
printout more to your liking.
Step 5: Exit GED
If you are not going on to exercise 6 at this time, you may
exit GED (Alt-X).
Congratulations! You can now make hardcopy of your work!
GED Exercises 10 Version 1.08
Exercise 6: Starting from scratch -- a new DFD
Step 1: Start GED
Do this the same way you did it in Exercise 1.
Step 2: Locate to diagram 0.2.3
Do this the same way you did it in Exercise 3.
Step 3: Go to the child of process 2
Press the Child key (F9) when the cursor is located over
process 2.
Press the space bar to clear the message on the message line.
Notice that the In and Out flows to the process show up on the
otherwise blank diagram as Description objects. Description
objects can convey comments or information on your diagrams,
but are otherwise not checked or parsed or used in the data
dictionary.
Step 4: Create some stuff
Add 3 processes--one called Encode sequence, one called Map to
real registers, and one called Emit machine code. A process
is added by moving the cursor to where the center of the
process should be, pressing the Create Process key (Alt-P) and
typing in the name of each process. The process can be
enlarged if necessary by the methods described in Exercise 4.
Add 2 stores--one called Code Fragments, and the other called
Op Codes. Stores are added by moving the cursor to where the
center of the store should be, pressing the Create Store key
(Alt-S), and typing in the name of each store. You may wish
to move them around later.
Add a flow from near the left edge of the diagram to the
Encode sequence store, and give it the name Optimized parse
trees. A flow is added by moving the cursor to the starting
object and pressing the Create Flow key (Alt-F) then moving to
the ending object and pressing the Create Flow key again, and
finally typing in the name of the flow. The flow can be
adjusted in the manner described in Exercise 4.
Add a flow from Encode sequence to Map to real registers.
Before pressing the final flow, add a route point by pressing
the Create Route key (Alt-R or mouse right button). Add
several if you wish. Note that the Cancel key (Esc) will
remove the most recently created route point. Name the flow
sequenced-code. Note that the name is located on the first
route point.
Add a flow from Code Fragments to Encode sequence. Leave this
flow unnamed (flows to or from stores are assumed to be
GED Exercises 11 Version 1.08
structured like the store). This is done by pressing return
when prompted for a flow name.
Add a flow from Emit machine code to Map to real registers.
Name it register-mapped code. Oops! It's going in the wrong
direction! Let's get that fixed. Place the cursor over the
flow, and press the Toggle key (shift-F5) until the flow has a
single arrow pointing to Emit machine code.
Add a flow from Op Codes to Emit Machine code. Leave it
unnamed.
Add a flow from Emit Machine code to a point near the right
boundary. Name this flow machine code.
Step 5: Save your work
Press the Save key (F6) to put your work on this diagram on
disk.
Step 6: Exit GED
Exit GED (Alt-X).
Congratulations, graduate! You can use all of GED's basic
functions!